//
// Created by Thinkpad on 2025/10/29.
//

#include <iostream>
#include <string>
using namespace std;

int main() {
    string full_name;
    string planet {"Earth.Where the sky is blue"};
    string perfered_planet{planet};
    string message {"hello there",5};

    string weird_message (4,'e');
    string greeting{"hello world"};
    string saying_hello{ greeting,6,5};

    cout << "full_name : " << full_name << endl;
    cout << "planet : " << planet << endl;
    cout << "message : " << message << endl;
    cout << "perfered_planet : " << perfered_planet << endl;
    cout << "greeting : " << greeting << endl;
    cout << "saying_hello : " << saying_hello << endl;

    // The + operator
    string str1 {"hello"};
    string str2 {"world"};
    string msg = str1 + " my "+ str2;
    cout << "str1 : " << str1 << endl;
    cout << "str2 : " << str2 << endl;
    cout << "msg : " << msg << endl;

    cout << "using the append method :" << endl;
    string str10 {"hello"};
    string str11 {"world"};
    string str12 = str10.append(str11);
    cout << "str12 : " << str12 << endl;

    string str13 {string{"hello"}.append(" world")};

    return 0;
}